package cate.game.activity.newherotrial.msg;

import cate.game.activity.newherotrial.data.HeroTrialOptionHeroVO;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBHeroTrial;
import cate.game.play.part.BattleHero;
import easy.java.dev.note.NoteField;

import java.util.ArrayList;
import java.util.List;

@ClientMsg(title = "获取候选英雄 の 返回")
public class HeroTrialOptionHeroResp implements MsgOutput {
    @NoteField("功能id")
    public int funcId;

    @NoteField("关卡id")
    public int trialId;

    @NoteField(value = "候选英雄")
    public List<HeroTrialOptionHeroVO> heros = new ArrayList<>();

    public HeroTrialOptionHeroResp(){

    }

    public HeroTrialOptionHeroResp(int funcId, List<BattleHero> optionHeros, int trialId) {
        this.trialId = trialId;
        this.funcId = funcId;
        for (BattleHero optionHero : optionHeros) {
            this.heros.add(HeroTrialOptionHeroVO.of(optionHero));
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBHeroTrial.OPTION_HERO_RESP;
    }
}
